package ai.plantdata.Behavior.mode.VisitorPattern.interfaces.impl;

import ai.plantdata.Behavior.mode.VisitorPattern.interfaces.ComputerPartVisitor;

/**
 * @Author: WangHui
 * @Date: 2020/12/24 15:02
 * @Description: 实际访问者
 */
public class ComputerPartDisplayVisitor implements ComputerPartVisitor {
    @Override
    public void visit(Computer computer) {
        System.out.println("Displaying Computer");
    }

    @Override
    public void visit(Mouse mouse) {
        System.out.println("Displaying Mouse");
    }

    @Override
    public void visit(Keyboard keyboard) {
        System.out.println("Displaying Keyboard");
    }

    @Override
    public void visit(Monitor monitor) {
        System.out.println("Displaying Monoytor");
    }
}
